<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="1500" indicator-color="white">
      <van-swipe-item v-for="item in arr" :key="item.id"><img :src="$pre + item.img" alt=""></van-swipe-item>
      
    </van-swipe>
  </div>
</template>

<script>
import axios from "axios";
import { getHomeBanner } from "../../../http/http";
export default {
  data() {
    return {
      arr: [],
    };
  },
  mounted() {
    getHomeBanner().then((res) => {
      this.arr = res.data.list;
    });
  },
};
</script>
    
<style scoped>
.my-swipe {
    height: 2.5rem;
  }
  img{
    width: 100%;
    height: 100%;
  }
</style>